import { routes, resetRouter } from '@/router'
export default {
  namespaced: true,
  state() {
    return {
      menuList: [...routes]
    }
  },
  mutations: {
    setMenuList(state, asyncRoutes) {
      state.menuList = [...routes, ...asyncRoutes]
    },
    // 退出清空路由
    resetMenu(state) {
      state.menuList = [...routes]
      resetRouter()
    }
  }
}
